/**
 * made by xufeng
 * Jul 9, 2008 10:26:36 AM
 *  
 */
package net.litxuf.Util;

import java.io.InputStream;
import java.util.Locale;
import java.util.Properties;

/**
 * @author xuFeng
 *
 */
public class PropertiesUtil {
	private static InputStream i;
 

	private static Properties p;
	 

	private static String UserDirectoryFile = "siteConfig.properties";
	 
	/**
	 * 
	 */
	static {
		Locale locale=Locale.getDefault();
		i = PropertiesUtil.class.getClassLoader().getResourceAsStream(
				UserDirectoryFile);
		 
		if (null == i) {
		} else {
			try {
				p = new Properties();
				p.load(i);
				i.close();
				 
			} catch (java.io.IOException e) {
				p = null;
				 
			} finally {
				i = null;
			 
			}
		}
	}

	/**
	 * 
	 * @param sqlName
	 * @return
	 */
	public static String getValueByKey(String key) {
		return p.getProperty(key);
	}
	
}
